import {createRouter, createWebHistory} from "vue-router";
import LayOut from '../views/layout/index.vue'

const router = createRouter({
    history: createWebHistory(),
    routes: [
        {
            path: "/",
            name: "main",
            component: LayOut,
            redirect: '/DynamicRouting',
            meta: {
                title: '常见问题',
                label: '常见问题',
            },
            children: [
                {
                    path: "DynamicRouting",
                    component: () => import('@/pageShows/DynamicRouting/index.vue'),
                    title: '动态路由',
                    label: '动态路由',
                    name: 'DynamicRouting'
                },
                {
                    path: "SvgIconComponent",
                    component: () => import('@/pageShows/SvgIconComponent/index.vue'),
                    title: 'svg组件封装',
                    label: 'svg组件封装',
                    name: 'SvgIconComponent'
                },
                {
                    path: 'InternationAlization',
                    component: () => import('@/pageShows/InternationAlization/index.vue'),
                    title: '国际化',
                    label: '国际化',
                    name: 'InternationAlization'
                },
                {
                    path: 'ActiveChangeStyle',
                    component: () => import('@/pageShows/ActiveChangeStyle/index.vue'),
                    title: '动态换肤',
                    label: '动态换肤',
                    name: 'ActiveChangeStyle'
                },
                {
                    path: 'HeaderSearch',
                    component: () => import('@/pageShows/HeaderSearch/index.vue'),
                    title: '页面搜索',
                    label: '页面搜索',
                    name: 'HeaderSearch'
                },
                {
                    path: 'GuideView',
                    component: () => import('@/pageShows/GuideView/index.vue'),
                    title: '引导页',
                    label: '引导页',
                    name: 'GuideView'
                },
                {
                    path: 'UploadExcel',
                    component: () => import('@/pageShows/UploadExcel/index.vue'),
                    title: 'excel上传',
                    label: 'excel上传',
                    name: 'UploadExcel'
                },
                {
                    path: 'JsonToExcel',
                    component: () => import('@/pageShows/JsonToExcel/index.vue'),
                    title: 'excel导出',
                    label: 'excel导出',
                    name: 'JsonToExcel'
                },
                {
                    // PartialPrinting
                    path: 'PartialPrinting',
                    component: () => import('@/pageShows/PartialPrinting/index.vue'),
                    title: '局部打印',
                    label: '局部打印',
                    name: 'PartialPrinting'
                },
                {
                    // PowerController
                    path: 'PowerController',
                    component: () => import('@/pageShows/PowerController/index.vue'),
                    title: '权限控制',
                    label: '权限控制',
                    name: 'PowerController'
                },
                {
                    // ToggleRelativeTime
                    path: 'ToggleRelativeTime',
                    component: () => import('@/pageShows/ToggleRelativeTime/index.vue'),
                    title: '相对时间的转换',
                    label: '相对时间的转换',
                    name: 'ToggleRelativeTime'
                },
                {
                    // DynamicTable
                    path: 'DynamicTable',
                    component: () => import('@/pageShows/DynamicTable/index.vue'),
                    title: '动态表格渲染',
                    label: '动态表格渲染',
                    name: 'DynamicTable'
                }
            ],
        },
    ],
});
export default router;
